/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package argtrust.belief;

import aima.core.logic.fol.parsing.ast.Sentence;
import argtrust.logic.InferenceRule;
import argtrust.trustnet.Agent;
import argtrust.measure.LevelMeasure;
import argtrust.measure.Measure;

/**
 *
 * @author Yuqing Tang
 */
public class BeliefFactory {

    public static FactBelief createBelief(Agent agent,
            Sentence fact,
            Measure measure) {
        FactBelief b = new FactBelief(agent, fact);
        b.setMeasure(measure);
        return b;
    }

    public static InferenceRuleBelief createBelief(Agent agent,
            InferenceRule rule,
            Measure measure) {
        InferenceRuleBelief b = new InferenceRuleBelief(agent, rule);
        b.setMeasure(measure);
        return b;
    }

    public static FactBelief createBelief(Agent agent, 
            Sentence fact,
            double level) {
        FactBelief b = new FactBelief(agent, fact);
        b.setMeasure(new LevelMeasure(level));
        return b;
    }

    public static InferenceRuleBelief createBelief(Agent agent,
            InferenceRule rule,
            double level) {
        InferenceRuleBelief b = new InferenceRuleBelief(agent, rule);
        b.setMeasure(new LevelMeasure(level));
        return b;
    }
}
